#include <stdio.h>
int main()
{int a;
 int n;
 int hanshu(int a,int b);
 printf("count the sum of a+aa+aaa+aaaa,tell me the a and hom many '+' you have:");
 scanf("%d,%d",&a,&n);
 printf("the sum is:%d",hanshu(a,n));
 return 0;
}
int hanshu(int a,int b)
{int z=0;
 int x=0;
 int c=0;
 int i=1;
 while(i<=b)
 {z=z+a;
  c=c+z;
  a=a*10;
  ++i;
 }
  return c;
}